package com.southpark.demo.view
{
	import com.southpark.demo.interfaces.model.IModel;
	import com.southpark.system.interfaces.application.IApplication;
	import com.southpark.system.interfaces.managers.IApplicationManager;
	import com.southpark.system.view.AbstractToolTipUI;
	
	import flash.events.Event;
	
	import mx.core.FlexGlobals;


	public class BaseToolTipUI extends AbstractToolTipUI
	{
		private var applicationManager:IApplicationManager = IApplication(FlexGlobals.topLevelApplication).applicationManager;
		[Bindable]protected var model:IModel = applicationManager.model as IModel;
		
		public function BaseToolTipUI()
		{
			var onChange:Function = function():void{dispatchEvent(new Event(Event.CHANGE))};
			resourceManager.addEventListener(Event.CHANGE,onChange);
		}
		
		[Bindable(event="change")]
		protected function getText(resourceName:String,parameters:Array=null):String
		{
			return applicationManager.textManager.getText(resourceName,parameters);
		};
		

	}
}